package com.xyzk.diagnose.tools;
import android.os.Environment;

import com.xyzk.diagnose.entity.Cartype;

public class Common {
	public static boolean Debug = false;
	public static boolean dialogResult = false;//对话选择确定还是取消
	public static boolean wait = false;        //等待
	public static int CanMode = 0; //default
	public static int printNum = 1;	//打印机序号
	public static int station = -1;	//固定的工位序号
	public static int printPinNum = 2;	//打印密码本序号
	public static int stationPos;      //选择的工位下标
	public static String stationName;     //选择的工位名称
	public static int Communication = 0;  // 连接方式  默认蓝牙
	public static int serverPort = 4000;
	public static String serverIP = "192.168.10.100";//工控机IP
	//public static String mesServerIp;		//MES上传接口
	public static String obdSerialNum;     //OBD序列号
	public static String obdVersion;		//OBD软件版本
	public static String mes_ip  = "";
	public static String mes_ver = "";
	public static String mes_ems = "";
	public static String mes_obd = "";
	public static String mes_esc = "";
	public static String mes_obd2 = "";
	public static int mes_obd2_en = 0;
	public static int waittime = 100; //通讯时间间隔
	public static int cmd_freq = 3;
	//文件相关信息
	public static final boolean ENGLISH = false;
	public static final boolean DEBUG = true;
	public static final String DIR = Environment.getExternalStorageDirectory()+ "/EOL_DOWNLINE/";//根目录
	public static final String GUEST = DIR + "CHERY_KF/";
	public static final String FLASH = GUEST + "FLASH/";
	public static final	String LOG = DIR + "LOG/";
	public static final String CN  = "_cn";
	public static final String db_name = DIR + "DB/result.db";
	public static final String NULL = " --- ";  //无结果
	public static final String OK = "OK";	//OK
	public static final String NG = "NG";	//NOK
	public static final String ID = "SHOW_ID";
	public static final String TESTNAME = "SHOW_CONTEXT";
	public static final String CONTENT = "SHOW_RESULT";
	public static final String CTAND = "SHOW_CTAND";
	public static final String RESULT = "SHOW_TIME";
	public static final String SHW = "SHW";
	public static final String OPT = "OPT";
	public static final String REQ = "REQ";
	public static final String CMD = "CMD";
	public static final String ON = "ON";
	public static final String OFF = "OFF";
	public static final String NO = "NO";
	public static final String WAIT = "WAIT";
	public static final String START = "START";
	public static final String NOLINK = "NOLINK";
	public static final String MODULE_NAME = "MODULE_NAME";
	public static final String MODE = "MODE";
	public static final String STATION = "STATION";
	public static final String MAC_ADDRESS = "MAC_ADDRESS";
	public static final String INTERNET = "INTERNET";
	public static final String CAR = "CAR";
	public static final String CARTYPE = "CARTYPE";
	public static final String CAN = "CAN";

	public static String ServerName = "PCHOST";  //服务器名称
	public static String BoxName = "330100001000";		//Box名称
	public static String BoxIP = "192.168.1.1";
	public static String terminalStation = "123"; //工位号
	public static final int SET_MAX_TIME = 800; //初始化超时时间
	public static final int CMD_MAX_TIME = 2500; //命令超时时间
	public static final int RESTART_WAIT_TIME = 3000; //命令超时时间
	public static final int SERVER_MAX_TIME = 5000;//服务器最大延时
	public static final int CMD_REQUEST = 3;	//发送请求次数
	public static final int DIALOG_WAIT_TIME = 500;//Dialog等待时间
	public static final int WAIT_TIME = 100;       //通讯时间间隔
	public static final int SET_WAIT_TIME = 50;    //通讯时间间隔
	public static final int DB_VERSION = 1;
	public static String web_GetTPMS = "";  //胎压IP

	//Dialog
	public static final int DIALOG_WAIT_AUTO_CLOSE = 101; //弹出自动关闭窗口
	public static final int DIALOG_SHOW_YES_NO =  102;	//弹出提示对话框
	public static final int DIALOG_SHOW_TEXT = 103;
	public static final int DIALOG_SHOW_PROGRESS = 104;
	public static final int TEXTVIEW_SHOW_TIP = 105;
	public static final int FLASH_DATA_LIST = 106;
	public static final int FLASH_MODULE_LIST = 107;

	public static final int MSG_Dialog_WaitTime = 108;
	//蓝牙连接状态
	public static final int SHOW_ACTIVITY_RESULT  = 108;
	public static final int RESULT_OK = 109; //返回值OK
	public static final int RESULT_FAIL  = 110; //返回值失败
	public static final int BLUE_STATE_NONE = 111;    //未连接
	public static final int BLUE_STATE_CONNECT_FAILD = 112; // 连接失败
	public static final int BLUE_STATE_CONNECTING = 113; // 正在连接
	public static final int BLUE_STATE_CONNECTED = 114; // 已经连接
	public static final int BLUE_UPDATE_LIST = 115; //更新蓝牙已经配对列表
	public static final int BLUE_ADD_LIST = 116;	  //蓝牙新增列表
	public static final int BLUE_UPDATE_AND_SEARCH = 117; //更新列表并开始查找蓝牙
	public static final int BLUE_CHANGE_BLUETOOTH_NAME = 118; //蓝牙改名消息
	public static final int BLUE_UPDATE_BLUETOOTH_STATE = 119; //设置蓝牙连接状态
	public static final int BLUE_RECEIVE_CONNECT = 120;	//接收蓝牙连接消息
	public static final int BLUE_AUTO_CONNECT_BLUETOOTH = 121;	//自动连接蓝牙
	//上传数据状态
	public static final int UPLOAD_DATA_NULL = 130;
	public static final int UPLOAD_DATA = 131;
	public static final int UPLOAD_DATA_FAILED = 132;
	public static final int UPLOAD_DATA_SUCCESS = 133;
	public static final int UPLOAD_DATA_AGO = 134;

	public static final byte [] ZERO = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	public static final byte [] FF = {(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,
			(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,
			(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,
			(byte) 0xFF,(byte) 0xFF};


	//版本下载需要
	public static String ProjectName = "Eol_KF";  //项目名称
	public static boolean web_enable = false;
	public static String appVersion = null ; //服务器上的软件版本
	public static String appNote = null; //软件版本更新内容
	public static String FileName = null; //版本更新下载的文件名称
	public static String resource = null; //软件版本更新路径，下载版本时使用
	public static boolean dialog_isok = true; //是否要弹出窗口，避免弹出多个窗口
	public static Boolean downStatus = true ; //下载状态
	public static String web_API_SelectUpdate = ""; //查询版本更新ip地址
	public static String web_API_AppUpdate = ""; //下载版本软件ip地址
	public static String web_API_AppStatus = "";//上送终端状态地址
	public static String saveApkPath = Environment.getExternalStorageDirectory()+"/DownLoad/android/apk/";   //apk存储目录

	public static Cartype cartype;
	public static int PrintPinnum = 0;	//打印密码本序号
	public static int b_code;	//电池编码

	public static String web_updata = "";    //上传数据api
	public static String web_API_File = "";  //上传日志文件api
	public static String web_API_SelectPinforVin = "";  //获取vin码api
	public static String web_API_SelectHeat = "";  //获取温度api

	public static boolean updata_isok = false;

}
